package com.itheima.reggie.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.OrdersService;
import com.itheima.reggie.common.ResultInfo;
import com.itheima.reggie.domain.Orders;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class OrdersController {
    @Autowired
    private OrdersService ordersService;
    //查询所有
    @GetMapping("/order/page")
    public ResultInfo findBy( Integer page, Integer pageSize, String number){
       Page<Orders>page1= ordersService.findBy(page,pageSize,number);
       return ResultInfo.success(page1);
    }
}
